package com.jingyanku.pojo;

import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;

import com.base.pojo.BaseBean;
import com.system.pojo.Person;

/**
 * Board entity. @author MyEclipse Persistence Tools
 */

public class Board extends BaseBean {

	// Fields

	private Integer id;
	private String description;
	private String name;
	private Integer replyCount;
	private Integer threadCount;
	private Reply lastReply;
	private Thread lastThread;
	private Category category;
	private Integer bid;
	private Set<Person> administrators = new HashSet<Person>();
	// Constructors

	/** default constructor */
	public Board() {
	}

	/** minimal constructor */
	public Board(Integer replyCount, Integer threadCount) {
		this.replyCount = replyCount;
		this.threadCount = threadCount;
	}

	/** full constructor */
	public Board(  Integer version,
			String description, String name, Integer replyCount,
			Integer threadCount, Reply lastReplyId, 
			Thread lastThreadId) {
		this.description = description;
		this.name = name;
		this.replyCount = replyCount;
		this.threadCount = threadCount;
		this.lastReply = lastReply;
		this.lastThread= lastThread;
	}

	// Property accessors

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}


	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getReplyCount() {
		return this.replyCount;
	}

	public void setReplyCount(Integer replyCount) {
		this.replyCount = replyCount;
	}

	public Integer getThreadCount() {
		return this.threadCount;
	}

	public void setThreadCount(Integer threadCount) {
		this.threadCount = threadCount;
	}

	public Reply getLastReply() {
		return lastReply;
	}

	public void setLastReply(Reply lastReply) {
		this.lastReply = lastReply;
	}

	public Thread getLastThread() {
		return lastThread;
	}

	public void setLastThread(Thread lastThread) {
		this.lastThread = lastThread;
	}

	public Category getCategory() {
		return category;
	}

	public void setCategory(Category category) {
		this.category = category;
	}

	public Integer getBid() {
		return bid;
	}

	public void setBid(Integer bid) {
		this.bid = bid;
	}

	public Set<Person> getAdministrators() {
		return administrators;
	}

	public void setAdministrators(Set<Person> administrators) {
		this.administrators = administrators;
	}

}